package wuke.service;

import java.util.List;

import wuke.model.Contact;
import wuke.show.DBUtil;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

public class DBService extends Service{
	
	
	private final IBinder mBinder = new LocalBinder();

	

	@Override
	public IBinder onBind(Intent intent) {
	
		return mBinder;
	}
	
	
	public class LocalBinder extends Binder{
		
		
		public DBService getService(){					
			return DBService.this;
		}

	}
	
	public List<Contact> queryContacts(){
		
		List<Contact> contacts = new DBUtil(this).queryContacts();
			return contacts;
	}
	


}
